<template>
  <div class="container">
    <mi-header :backIconShow="true" :cartIconShow="false">购物车清单</mi-header>
    <cart-list></cart-list>
    <total-panel></total-panel>
  </div>
</template>

<script>
import MiHeader from "../components/Header/index.vue";
import CartList from "../components/CartList/index.vue";
import TotalPanel from "../components/TotalPanel/index.vue";

export default {
  name: "CartPage",
  components: {
    MiHeader,
    CartList,
    TotalPanel,
  },
  mounted() {
    //派发执行state,同步localStorage里的数据到state数据里
    this.$store.dispatch("setData");
  },
};
</script>